package com.itheima.Demo1;

public class Test1Inner {
    public static void main(String[] args) {
        Outer.Inner i = new Outer().new Inner();
        i.show();

        Outer o =new Outer();
        o.method();
    }
}


class Outer{
    private int a =100;
    class Inner{
        int num  =  10;
        public void show(){
            System.out.println("内部类里面方法");
            //内部类，可以直接访问外部类成员，包括私有
            System.out.println(a);
        }
    }
    public void method(){
        Inner i = new Inner();
        i.show();
    }
}
